//
//  Context.cpp
//  Editor
//
//  Created by Jeppe Nielsen on 10/19/14.
//  Copyright (c) 2014 Jeppe Nielsen. All rights reserved.
//

#include "Project.hpp"
#include "Context.hpp"

Context::Context() : CurrentProject(this) {
    CurrentProject = 0;
}

Context::~Context() {
    delete CurrentProject;
    CurrentProject = 0;
}

void Context::CreateNewProject(QString path) {
    CloseProject();
    Project* project = new Project();
    project = new Project();
    project->path = path;
    project->Initialize();
    CurrentProject = project;
}

void Context::CloseProject() {
    delete CurrentProject;
    CurrentProject = 0;
}
